package com.terracloud.server.dao.sql.role;

import com.terracloud.server.dao.model.sql.RoleEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.UUID;

/**
 *
 * @author chenhainan
 * @since 2025/10/20
 */
public interface RoleRepository extends JpaRepository<RoleEntity, UUID>, JpaSpecificationExecutor<RoleEntity> {

    RoleEntity findByTenantIdAndId(UUID tenantId, UUID id);

    RoleEntity findByTenantIdAndName(UUID tenantId, String name);

    void removeByTenantIdAndId(UUID tenantId,UUID id);

}
